The present invention in general relates to a numerical control apparatus for synchronous control of two or more spindle motors or servo motors driven in a machine tool. More particularly, this invention relates to a numerical control apparatus capable of realizing synchronous control of higher precision.
Some of the machine tools are hitherto capable of executing synchronous control of two or more spindle motors or servo motors to be driven. For example, the numerical control apparatus executes the processing program commanded from a paper tape or the like, that is, executes the numerical control process written in the processing program, and the spindle motors or servo motors of the machine tool are driven to process the work as commanded.
FIG. 12 is an essential block diagram showing an outline of a conventional numerical control apparatus for driving spindle motors or servo motors of a machine tool.
As shown in FIG. 12, the conventional machine tool comprises a numerical control apparatus 101 for synchronously controlling a motor for driving a reference axis of a lathe and a motor for driving the synchronous axis, a processing program 102 in which a program for numerical control processing is written, the reference axis including a spindle amplifier 120, a spindle motor 121, a gear 122, a reference spindle 123, and an encoder 124, and the synchronous axis including a spindle amplifier 140, a spindle motor 141, a gear 142, a synchronous spindle 143, and an encoder 144, and the rotating speed of two spindles is synchronously controlled by the numerical control apparatus 101, and further by closing chucks 125 and 145, a work 200 is held between the reference spindle 123 and synchronous spindle 143.
On the reference axis and synchronous axis, the spindle amplifiers 120 and 140 are installed between the numerical control apparatus 101 and spindle motor 121, and between the numerical control apparatus 101 and spindle motor 121, respectively, and the spindle amplifiers drive the corresponding spindle motors 121 and 141. The reference spindle 123 and synchronous spindle 143 installed by way of the gears 122 and 142 are controlled according to the feedback position from the corresponding encoders 124 and 144. The numerical control apparatus 101 comprises, as shown in the drawing, an analysis processing unit 103 for analyzing the information about the reference axis and synchronous axis, an interpolation processing unit 104 for issuing the interpolation position command or rotating speed command analyzed in the analysis processing unit 103 to subsequent circuits, a PLC circuit 105 for issuing a specified signal, a machine control signal processing unit 106 for processing the specified signal, a memory 107 for storing a processing program 102, a parameter setting unit 108 for setting parameters, a screen display unit 109 for displaying the information in the memory 107 on a screen, axis control units 110a, 110b, 110c, . . . for issuing the information about the reference axis and synchronous axis, interpolation position command, and rotating speed command to the subsequent circuits depending on the spindle to be driven, a reference axis control unit 111 which controls the reference axis on the basis of the received information, a synchronous axis control unit 112 which control the synchronous axis on the basis of the received information, and a data input/output circuit 113 for issuing various information to the reference axis and synchronous axis.
The conventional numerical control apparatus will now be explained in detail. Herein, in the spindle motor 121 for driving the reference spindle 123 and the spindle motor 141 for driving the synchronous spindle 143, the spindle synchronous control is explained.
In FIG. 12, for example, the processing program 102 being read in from a tape reader is read out and stored in the memory 107. Since the spindle synchronous control is a control executed by the spindle synchronous command code, the spindle synchronous command coded described in the processing program 102 is read out into the analysis processing unit 103 in every block from the memory 107.
The spindle synchronous command code thus being read out is analyzed in the analysis processing unit 103, and the analysis processing unit 103 notices its analysis result, that is, the information about the reference axis and synchronous axis for synchronous control to the interpolation processing unit 104.
Receiving this information, the interpolation processing unit 104 notices information about the reference axis, for example, to the axis control unit 110b (see FIG. 12) assigned to the reference axis, out of the axis control units 110a, 110b, 110c, . . . , and notices information about the synchronous axis to the axis control unit 110c (see FIG. 12) assigned to the synchronous axis. Herein, the spindle synchronous control is explained, but not in case of spindle synchronous control, for example, information about rotating speed is noticed to the axis control unit 110a (see FIG. 12) not assigned to either reference axis or synchronous axis. In this case, therefore, information about rotating speed command is directly noticed to the data input/output circuit 113, and the spindle amplifier 120 receiving this rotating speed command controls the speed of the spindle motor 121 according to this command, and rotates the spindle 123.
The axis control units 110a, 110b, 110c, . . . are assigned as shown in the diagram for the sake of convenience of explanation, but each axis control unit operates similarly when assigned to the reference axis, assigned to synchronous axis, or not assigned to either.
Consequently, the axis control unit 110b notices information about the reference axis, rotating speed command and other information to the reference axis control unit 111 as shown in the diagram, whereas the axis control unit 110c notices information about the synchronous axis to the synchronous axis control unit 112. In the reference axis control unit 111, the command position of the reference axis is calculated from the received rotating speed command, and notices this command position to the data input/output circuit 113 and synchronous axis control unit 112. The synchronous axis control unit 112 calculates the command position of the synchronous axis according to the command position of the reference axis noticed from the referenced axis control unit 111 and the information about the synchronous axis is noticed to the data input/output circuit 113.
Finally, the data input/output circuit 113 notices the received position commands to the spindle amplifiers 120 and 140, and the spindle amplifier 120 having received the command position of reference axis rotates the reference spindle 123 by controlling the speed of the spindle motor 121 according to the received command position, and further the spindle amplifier 140 having received the command position of synchronous axis rotates the synchronization spindle 143 by controlling the speed of the spindle motor 141 according to the received command position. Thus, in the conventional numerical control apparatus, the synchronous axis control unit 112 controls the command position of the synchronous axis on the axis of the command position of the reference axis calculated by the reference axis control unit 111, so that spindle synchronous control is executed between one reference spindle 123 and one synchronous spindle 143.
In the conventional numerical control apparatus, however, synchronous control about two spindles in the machine tool is possible, but this control is limited within a set of reference axis and synchronous axis. It means that three or more spindles cannot be synchronously controlled at the same time.
The reason is as follows. For example, if each axis is synchronized by noticing the command position, the axes are finally converged at the specified position, but each axis of synchronous control is different in the position control gain, speed and load, and hence there is a position deviation amount, and the precision of synchronism is lowered in an intermediate process. Accordingly, in the conventional numerical control apparatus, for example, in case of synchronous control of plural axes, one reference axis monitors fluctuations of two or more synchronous axes, and synchronous control is effected while correcting so as to decrease the position deviation amount, and therefore the control is very much complicated, and three or more spindles could not be synchronously controlled at the same time.
Accordingly, in the machine tool conventionally used, in order to perform spindle synchronous control on plural axes, it is necessary to install plural numerical control apparatuses, and the cost of the machine tool is higher. As a result, the control panel for installing the numerical control apparatuses becomes larger in size.
Further, in synchronous control of the conventional numerical control apparatus, when grabbing one work between spindles and closing the chuck, the axes may fluctuate due to disturbance or the like. Thus, in a state having a stagnant position deviation amount, when the reference axis and synchronous axis are mechanically coupled through the work, each axis moves in a direction for recovering the position deviation amount, and an abnormal torque occurs, and the work may be flawed or distorted.
It is an object of this invention to present a numerical control apparatus capable of realizing synchronous control of two or more spindles in a machine tool, realizing synchronous control of three or more spindles at the same time, and also enhancing the precision of synchronism more than in the conventional apparatus.
The numerical control apparatus according one aspect of this invention is for synchronously controlling a plurality of spindle motors or servo motors driven by a machine tool according to a processing program. This numerical control apparatus comprises a memory unit (corresponding to a memory 7 described in an embodiment later) which stores the processing program, a synchronous control management unit (corresponding to synchronous control management unit 11) which manages the dominant relation of plural axes to be controlled synchronously, and plural axis control units (corresponding to axis control units 10a, 10b, 10c, . . . ), having information about reference axis as the reference of synchronous control and information about synchronous axis for operating synchronously with the reference axis stores according to the dominant relation of axes managed by the synchronous control management unit, for controlling the corresponding motors on the basis of the command position calculated inside. In this construction, one axis control unit stores information about reference axis, and plural axis control units stores information about synchronous axis control the individual motors, and the plural axes can be controlled synchronously in relation to one reference axis, and also other axis can be controlled synchronously on the basis of the reference axis.
According to the above-mentioned aspect, the processing program being read out from the tape reader or the like is stored in the memory unit, and the information about the reference axis or synchronous axis, and the information about the rotating direction of synchronous axis, rotation ratio and others are analyzed inside, for example, on the basis of the spindle synchronous command described in the program, and the result is noticed to the synchronous control management unit. In the synchronous control management unit, combination of all axes for synchronous control is management, and this information is noticed to the plural axis control units, thereby setting one axis control unit which controls the reference axis, and one or plural axis control units which control the synchronous axis. Thus, the numerical control apparatus of the invention realizes synchronous control of three or more spindle motors or servo motors easily by management of the synchronous control management unit. That is, for one reference axis, plural axes (synchronous axes) can be control synchronously, and also other axis can be controlled synchronously on the basis of the synchronous axis.
Moreover, since combination of plural sets of synchronous controls can be managed, wrong combination of synchronous controls can be judged easily, and in the event of a wrong combination of synchronous controls, it is noticed to the user by alarm or the like, and the wrong combination still exists, by performing synchronous control by exchanging the reference axis and synchronous axis, synchronous control is possible in an arbitrary combination without user""s consciousness about reference axis and synchronous axis.
Furthermore, in the numerical control apparatus, each one of the plural axis control units comprises an axis control system changeover unit (corresponding to an axis control system changeover unit 71 described in embodiment below) which changes over to either system of speed control system (speed control mode) for driving the corresponding motor depending on the speed command value described in the processing program or the position control system (position control mode) for driving depending on the moving stroke per unit time converted from the speed command value, an axis control command converting unit (corresponding to an axis control command converting unit 72) which calculates the moving stroke per unit time from the speed command value with respect to the reference axis, reference position input and output units (corresponding to reference position input unit 73 and reference position output unit 75) which issues the moving stroke per unit time of the reference axis calculated in the axis control command value converting unit to other axis control unit, or for receiving the moving stroke per unit time of the reference axis calculated in other axis control unit, and a synchronous position calculation processing unit (corresponding to synchronous position calculation processing unit 74) which calculates the command position corresponding to the pertinent axis, on the basis of the moving stroke calculated in the axis control command value converting unit or the moving stroke received in the reference position input unit.
Thus, in synchronous control of axis (position control system), when controlling the reference axis, the synchronous position calculation processing unit adds the moving stroke of the reference axis calculated in the axis control command converting unit to the reference position of the reference axis, and calculates the command position to the reference axis, and when controlling the synchronous axis, on the other hand, the synchronous position calculation processing unit calculates the moving stroke per unit time of the synchronous axis, from the moving stroke received in the reference position input and output unit, the gear ratio of synchronous axis to referenced axis, command rotation ratio, and command unit time ratio, and adds the moving stroke to the reference position of the synchronous axis, thereby calculating the command position to the synchronous axis. As a result, on the reference axis and synchronous axis, an accurate command position can be calculated, and the precision of synchronous control of axis can be enhanced.
Furthermore, in the numerical control apparatus, the axis control system changeover unit of the axis control unit which control the synchronous axis calculates a theoretical command position by subtracting the speed command value described in the processing program, theoretical value of position deviation amount calculated from the position control gain of the motor, and delay amount corresponding to the sampling delay time of feedback position, from the feedback position from the axis, and later changes over from the ordinary speed control system to the position control system in a contracted state of fluctuation of position deviation amount.
Thus, since changeover from the speed control system of spindle for synchronous control to position control system is executed by calculating the theoretical command position in the specified procedure (calculation by axis control system changeover unit in the axis control unit which controls the synchronous axis), and then contracting the fluctuation of the position deviation amount, the mode can be changed over to the synchronous control mode (position control system) without causing any effect on the operation of the reference axis. Therefore, since the synchronization of the axis can be controlled without causing effect on processing during processing at the reference axis side, the processing cycle can be shortened.
Furthermore, in the numerical control apparatus, each one of the plural axis control units further comprises a synchronous position correction unit (corresponding to a synchronous position correction unit 76 described in embodiment below) which corrects the fluctuation of the axis by calculating the position correction amount form the position deviation amount of reference axis and position deviation amount of synchronous axis, and adding the position correction amount to the command position of the synchronous axis.
Thus, in case of synchronization control of axis, the axis control unit which controls the reference axis calculates the command position to the reference axis, and the plural axis control units which control the synchronous axis calculate the command position to the synchronous axis on the basis of the moving stroke per unit time received from the axis control unit which controls the reference axis. The synchronous position correction unit corrects the fluctuation of the axis by adding the obtained position correction amount only to the command position of the synchronous axis. Therefore, since the axis can be controlled simultaneously without causing effect on processing during processing at the reference axis sided, the processing cycle can be shortened, and further by correcting the command position of the synchronous axis, the synchronous precision is enhanced.
Furthermore, in the numerical control apparatus, the synchronous position correction unit in the axis control unit which controls the synchronous axis multiplies the position deviation amount of reference axis by the command rotation ratio of reference axis and synchronous axis, and the command unit time ratio, and calculates the difference between the calculation result and the position deviation amount of the reference axis, then determines the value of passing the obtained difference through the primary delay filter according to a specific time constant determined by the parameter as the position correction amount.
Thus, since the deviation occurring during synchronous control is corrected by passing the difference between the calculation result and position deviation amount of reference axis through the primary delay filter, abrupt changes of command position by correction do not occur, and occurrence of useless alarm can be avoided.
Furthermore, in the numerical control apparatus, each one of the plural axis control units comprises a theoretical position deviation amount calculation processing unit (corresponding to an theoretical position deviation amount calculation processing unit 77 described in embodiment below) which calculates the theoretical position deviation amount from the speed control value described in the processing program and the position control gain of the motor, and the synchronization position correction unit, in the axis control unit which control the synchronous axis, calculates the difference between the theoretical position deviation amount of the reference axis calculated in the theoretical position deviation amount calculation processing unit and the actual position deviation amount obtained from the reference axis, and determines the value calculated from the difference, the command rotation ratio of the synchronous axis to the reference axis, and the command unit time ratio, as the position correction amount.
Thus, since the synchronous position correction unit of the axis control unit which control the synchronous axis corrects the deviation portion occurring in synchronous control by using the actual delay amount to the theoretical position deviation amount of the reference axis as the position correction amount, synchronism deviation portion due to delay caused by cutting load or the like can be easily corrected, and moreover since the position control gain and load are different, even in case of synchronous control between axes always having a difference in position deviation amount, synchronous control of high precision can be realized without causing improper torque by correction. As a result, flaw or torsion of work can be prevented, so that processing of higher precision is possible.
Furthermore, in the numerical control apparatus, each one of the plural axis control units comprises a synchronous correction amount fixing unit (corresponding to a synchronous correction amount fixing unit 78 described in embodiment below) which calculates the average of the position deviation amount in steady rotation on the reference axis and synchronous axis for synchronous control, and further calculates their difference, and the synchronous position correction unit determines, in the axis control unit which control the synchronous axis, the difference calculated in the synchronous correction amount fixing unit as the position correction amount.
Thus, since the synchronous position correction amount of the axis control unit which control the synchronous axis corrects the deviation portion occurring during synchronous control by using the difference of the average values of position deviation amount on the reference axis and synchronous axis for synchronous control as the position correction amount, the position correction amount is a fixed value, so that the load by calculation of the position correction amount can be lessened.
Furthermore, in the numerical control apparatus, the memory incorporates a synchronous correction coefficient holding unit (corresponding to a synchronous correction coefficient holding unit 51 described in embodiment below) which calculates the average of the position deviation amount in steady rotation on the reference axis and synchronous axis for synchronous control, at the time of initial adjustment of the machine tool, and holds the value obtained by dividing this average by the speed control value as the coefficient for obtaining the position deviation amount, and the synchronous position correction unit calculates, in the axis control unit which control the synchronous axis, the average of the position deviation amount in steady rotation on the reference axis and synchronous axis for synchronous control, by applying the speed command value by the coefficient held in the synchronous correction coefficient holding unit, and obtains this difference as the position correction amount.
Thus, the synchronous position correction unit of the axis control unit which control the synchronous axis calculates the average of the position deviation amount on the reference axis and synchronous axis for synchronous cl control, and the value obtained by dividing this average by the speed command value is held in the synchronous correction coefficient holding unit as the coefficient for obtaining the position deviation amount. This held value is a constant for obtaining the position deviation amount not depending on the speed command value, and therefore if the speed command value is different from the time of initial adjustment in synchronous control, the position deviation amount in steady rotation can be easily calculated by multiplying the coefficient by the speed command value.
The numerical control apparatus may preferably further comprise a synchronous correction amount error canceling unit (corresponding to a synchronous correction amount error canceling unit 79 described in embodiment below) which cancels the variation component of position deviation amount caused by variation due to disturbance or the like, by subtracting the difference between the average of the position deviation amount in steady rotation on the axis for synchronous control and the actual position deviation amount, temporarily from the position correction amount.
Thus, when grabbing the work in a state changed in the position deviation amount of the axis, the difference between the average of the position deviation amount in steady rotation on the synchronous axis for synchronous control and the actual position deviation amount calculated preliminarily is subtracted temporarily from the position correction amount applied on the synchronous axis. As a result, variation component of the position deviation amount caused by variation due to disturbance or the like can be canceled, and synchronous control is realized at an optimum position deviation amount.
The numerical control apparatus may preferably further comprise a multi-level acceleration and deceleration parameter memory unit (corresponding to a multi-level acceleration and deceleration parameter memory unit 81 described in embodiment below) which stores the multi-level acceleration an deceleration speed generated by the acceleration and deceleration pattern of ordinary speed control system, multi-level reference acceleration and deceleration time constant, and multi-level acceleration and deceleration time constant multiplying factor by manipulating the parameter setting screen, a reference inclination amount calculation unit (reference inclination amount calculation unit 83) which calculates the reference inclination amount, as the acceleration and deceleration speed per unit time, from the maximum rotating speed and multi-level reference acceleration and deceleration time constant of the reference spindle and synchronous spindle, a multi-level. acceleration and deceleration pattern calculation unit (multi-level acceleration and deceleration pattern calculation unit 84) which calculates an appropriate multi-level acceleration and deceleration pattern from the set multi-level acceleration and deceleration pattern, and a multi-level acceleration and deceleration decision unit (multi-level acceleration and deceleration decision unit 82) which determines the multi-level acceleration and deceleration pattern to be noticed to the synchronous control management unit.
Thus, in spindle control between two or more spindle motors, when controlling the acceleration and deceleration of spindle motors by the multi-level acceleration and deceleration pattern of the position control system, the configuration for selecting an appropriate multi-level acceleration and deceleration pattern is designated. For example, if the multi-level acceleration and deceleration pattern is different on each spindle, the multi-level acceleration and deceleration time constant is determined on the basis of the one of the largest inclination of acceleration and deceleration, and other acceleration and deceleration patterns defined by a constant multiple (1 or larger integer) of the multi-level acceleration and deceleration time constant, and therefore an appropriate multi-level acceleration and deceleration pattern can be selected and judged by a simple process of comparison of multi-level acceleration and deceleration time constants.
For example, similarly, since an appropriate multi-level acceleration and deceleration pattern is calculated from the ratio of the multi-level acceleration and deceleration time constants between spindles different in the multi-level acceleration and deceleration pattern, if it is necessary to select the one of the large inclination of acceleration and deceleration, it can be easily corrected to an appropriate multi-level acceleration and deceleration pattern.